package com.edward.model;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class ActHarvest {
	
	private int id;
	
	private String type;
	
	private double sale;
	
	private double actRate;
	
	private double diffPrice;
	
	private double netProfit;
	
	private Date date;
	
	private List <ActHarvest> acts;
	

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public double getSale() {
		return sale;
	}

	public void setSale(double sale) {
		this.sale = sale;
	}

	public double getActRate() {
		return actRate;
	}

	public void setActRate(double actRate) {
		this.actRate = actRate;
	}

	public double getDiffPrice() {
		return diffPrice;
	}

	public void setDiffPrice(double diffPrice) {
		this.diffPrice = diffPrice;
	}

	public double getNetProfit() {
		return netProfit;
	}

	public void setNetProfit(double netProfit) {
		this.netProfit = netProfit;
	}

	@Temporal(TemporalType.DATE)
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@OneToMany(fetch = FetchType.EAGER)
	@JoinColumn(name="ACT_ID")
	public List<ActHarvest> getActs() {
		return acts;
	}

	public void setActs(List<ActHarvest> acts) {
		this.acts = acts;
	}
	
	
	

	
	
	
	
	

}
